package com.L1ngg;


public class text09 {
	
	public static void main(String[] args) {
		
		for(int i=100;i<1000;i++) {
			if(isNarcissistic(i)) {
				System.out.println(i);
			}
		}
	}
	
	public static boolean isNarcissistic(int number) {
		int originalNumber = number;
		int sum = 0;
		
		 while (number > 0) {  
	            int num = number % 10;  
	            sum += Math.pow(num, 3);  
	            number /= 10;  
	}
		 if(sum == originalNumber)
			 return true;
		 else
			 return false;
	}
}
